<!DOCTYPE HTML>
<title>Canvas test: security.reset</title>
<!--[if IE]><script src="../excanvas/excanvas.js"></script><![endif]-->
<script src="../tests.js"></script>
<link rel="stylesheet" href="../tests.css">
<link rel="prev" href="security.dataURI.html" title="security.dataURI">
<link rel="next" href="2d.getcontext.exists.html" title="2d.getcontext.exists">
<body class="show_output">
<p>
 <a href="security.dataURI.html" accesskey="p" title="[p] security.dataURI">&lt;</a>
 <a href="index.html">[index]</a>
 <a href="2d.getcontext.exists.html" accesskey="n" title="[n] 2d.getcontext.exists">&gt;</a>
<h1><a href="index.security.html">security</a>.reset</h1>
<p class="desc">Resetting the canvas state does not reset the origin-clean flag</p>
<div class="refs">References:
<ul>
<li><a href="spec.html#testrefs.initial.reset">initial.reset</a>

</ul>
</div>

<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>

<ul id="d"></ul>
<script>
_addTest(function(canvas, ctx) {

canvas.width = 50;
ctx.drawImage(document.getElementById('yellow.png'), 0, 0);
try { var _thrown = false; canvas.toDataURL(); } catch (e) { _thrown = true; } finally { _assert(_thrown, "should throw exception: canvas.toDataURL()"); }
canvas.width = 100;
try { var _thrown = false; canvas.toDataURL(); } catch (e) { _thrown = true; } finally { _assert(_thrown, "should throw exception: canvas.toDataURL()"); }


});
</script>
<img src="http://excors.googlepages.com/yellow.png" id="yellow.png" class="resource">

